package com.cy.pj.common.utils;

import com.cy.pj.sys.pojo.SysUser;
import org.apache.shiro.SecurityUtils;

public class ShiroUtils {
    public static  String getUsername(){
        return getUser().getUsername();
    }

    public static SysUser getUser() {

        return (SysUser) SecurityUtils.getSubject().getPrincipal();

    }
}
